import request from '@/utils/request'

export function APIindex(query) {
  return request({
    url: '/sysRole',
    method: 'get',
    params: query
  })
}

export function APIAll() {
  return request({
    url: '/sysRoleAll',
    method: 'get'
  })
}

export function APIcreate() {
  return request({
    url: '/sysRole/create',
    method: 'get'
  })
}

export function APIstore(data) {
  return request({
    url: '/sysRole/create',
    method: 'post',
    data
  })
}

export function APIshow(id) {
  return request({
    url: '/sysRole/' + id,
    method: 'get'
  })
}

export function APIedit(id) {
  return request({
    url: '/sysRole/' + id + '/edit',
    method: 'get'
  })
}

export function APIupdate(id, data) {
  return request({
    url: '/sysRole/' + id,
    method: 'put',
    data
  })
}

export function APIdestroy(id) {
  return request({
    url: '/sysRole/' + id,
    method: 'delete'
  })
}

export function APIFreeze(id) {
  return request({
    url: '/sysRole/Freeze/' + id,
    method: 'post'
  })
}
